package cn.gxa.j229.bug.finance.service.loanuser.impl;

import cn.gxa.j229.bug.finance.mapper.LoanUserMapper;
import cn.gxa.j229.bug.finance.pojo.LoanUser;
import cn.gxa.j229.bug.finance.service.loanuser.LoanUserService;
import cn.gxa.j229.bug.finance.utils.CreateNumber;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Author: fenglin
 * @Date:2020/9/22 11:33
 * @Version 1.0
 */
@Service("loanUserService")
public class LoanUserServiceImpl implements LoanUserService {

    @Resource
    LoanUserMapper loanUserMapper=null;
    @Override
    public int deleteByPrimaryKey(Integer id) {
        return 0;
    }

    @Override
    public int insert(LoanUser loanUser) {


        return loanUserMapper.insert(loanUser);
    }

    @Override
    public int insertSelective(LoanUser record) {
        return 0;
    }

    @Override
    public List<Map<String, String>> selectByPrimaryKey(Integer page, Integer limit) {
        return loanUserMapper.selectByPrimaryKey(page,limit);
    }

    @Override
    public int selectByPrimaryKeyCount(Integer page, Integer limit) {
        return loanUserMapper.selectByPrimaryKeyCount(page,limit);
    }

    @Override
    public List<Map<String, String>> selectPhone(String phone) {
        return loanUserMapper.selectPhone(phone);
    }

    @Override
    public List<Map<String, String>> selectSock(LoanUser loanUser) {
        return loanUserMapper.selectSock(loanUser);
    }

    @Override
    public int selectSockCount(LoanUser loanUser) {
        return loanUserMapper.selectSockCount(loanUser);
    }

    @Override
    public List<Map<String, String>> selectUsername(LoanUser loanUser) {
        loanUser.setPage((loanUser.getPage()-1)*loanUser.getLimit());
        return loanUserMapper.selectName(loanUser);
    }

    @Override
    public int selectUsernameCount(LoanUser loanUser) {
        return loanUserMapper.selectNameCount(loanUser);
    }

    @Override
    public List<Map<String, String>> selectLikeName(LoanUser loanUser) {
        loanUser.setPage((loanUser.getPage()-1)*loanUser.getLimit());
        return loanUserMapper.selectLikeName(loanUser);
    }

    @Override
    public int selectLikeNameCount(LoanUser loanUser) {
        return loanUserMapper.selectLikeNameCount(loanUser);
    }


    @Override
    public int update(LoanUser loanUser) {
        return loanUserMapper.update(loanUser);
    }

    @Override
    public int updateByPrimaryKey(LoanUser record) {
        return 0;
    }
}
